# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-lzo
pkgver=1.15
pkgrel=0
pkgdesc="Python bindings for the LZO data compression library"
url="https://github.com/jd-boyd/python-lzo"
arch="all"
license="GPL-2.0-or-later"
depends="python3"
makedepends="
	lzo-dev
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-wheel
	python3-dev
	"
checkdepends="py3-pytest"
source="https://github.com/jd-boyd/python-lzo/archive/v$pkgver/py3-lzo-$pkgver.tar.gz"
builddir="$srcdir/python-lzo-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" .dist/python_lzo-$pkgver-*.whl
}

sha512sums="
c674033d6ab86d82e720e5fe5e312ae7a8566198fac29ec9f4b939598f5b938c6bbcbac6e47f897b5b3f4aa27fef16ed1de70af4252854e84ab9a420da981470  py3-lzo-1.15.tar.gz
"
